package com.itheima.ssm.dao;

import com.itheima.ssm.domain.Traveller;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ITravellerDao {
    @Select("select * from traveller t, order_traveller ot " +
            "where t.id=ot.travellerid and ot.orderid=#{oid}")
    public List<Traveller> findByOid(String oid);

/*======================================================================*/
    @Delete("delete from traveller t, order_traveller ot " +
                        "where t.id=ot.travellerid and ot.orderid=#{oid}")
    public void deleteById(String oid);
    /*=============================================================*/
  /*  @Update("update  traveller t, order_traveller ot  set name=#{name},sex=#{sex}," +
            "phoneNum=#{phoneNum},credentialsType=#{credentialsType} credentialsNum=#{credentialsNum } where id=#{id}")
    public void update(Traveller traveller);*/
}
